0 CpxTRS
↳1 TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID), 0 ms)
↳2 CpxWeightedTrs
↳3 TypeInferenceProof (BOTH BOUNDS(ID, ID), 0 ms)
↳4 CpxTypedWeightedTrs
↳5 CompletionProof (UPPER BOUND(ID), 0 ms)
↳6 CpxTypedWeightedCompleteTrs
↳7 CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID), 0 ms)
↳8 CpxRNTS
↳9 CompleteCoflocoProof (⇔, 172 ms)
↳10 BOUNDS(1, n^1)
ackin(s(X), s(Y)) → u21(ackin(s(X), Y), X)
u21(ackout(X), Y) → u22(ackin(Y, X))
ackin(s(X), s(Y)) → u21(ackin(s(X), Y), X) [1]
u21(ackout(X), Y) → u22(ackin(Y, X)) [1]
ackin(s(X), s(Y)) → u21(ackin(s(X), Y), X) [1]
u21(ackout(X), Y) → u22(ackin(Y, X)) [1]
ackin :: s → s → ackout:u22 s :: s → s u21 :: ackout:u22 → s → ackout:u22 ackout :: s → ackout:u22 u22 :: ackout:u22 → ackout:u22 |
ackin(v0, v1) → null_ackin [0]
u21(v0, v1) → null_u21 [0]
null_ackin, null_u21, const
Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules:
The TRS has the following type information:
Rewrite Strategy: INNERMOST |
null_ackin => 0
null_u21 => 0
const => 0
ackin(z, z') -{ 1 }→ u21(ackin(1 + X, Y), X) :|: z = 1 + X, Y >= 0, z' = 1 + Y, X >= 0
ackin(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
u21(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
u21(z, z') -{ 1 }→ 1 + ackin(Y, X) :|: z = 1 + X, z' = Y, Y >= 0, X >= 0
eq(start(V, V1),0,[ackin(V, V1, Out)],[V >= 0,V1 >= 0]). eq(start(V, V1),0,[u21(V, V1, Out)],[V >= 0,V1 >= 0]). eq(ackin(V, V1, Out),1,[ackin(1 + X1, Y1, Ret0),u21(Ret0, X1, Ret)],[Out = Ret,V = 1 + X1,Y1 >= 0,V1 = 1 + Y1,X1 >= 0]). eq(u21(V, V1, Out),1,[ackin(Y2, X2, Ret1)],[Out = 1 + Ret1,V = 1 + X2,V1 = Y2,Y2 >= 0,X2 >= 0]). eq(ackin(V, V1, Out),0,[],[Out = 0,V2 >= 0,V3 >= 0,V = V2,V1 = V3]). eq(u21(V, V1, Out),0,[],[Out = 0,V4 >= 0,V5 >= 0,V = V4,V1 = V5]). input_output_vars(ackin(V,V1,Out),[V,V1],[Out]). input_output_vars(u21(V,V1,Out),[V,V1],[Out]). |
CoFloCo proof output:
Preprocessing Cost Relations
=====================================
#### Computed strongly connected components
0. recursive [multiple] : [ackin/3,u21/3]
1. non_recursive : [start/2]
#### Obtained direct recursion through partial evaluation
0. SCC is partially evaluated into ackin/3
1. SCC is partially evaluated into start/2
Control-Flow Refinement of Cost Relations
=====================================
### Specialization of cost equations ackin/3
* CE 7 is refined into CE [8]
* CE 6 is refined into CE [9]
* CE 5 is refined into CE [10]
### Cost equations --> "Loop" of ackin/3
* CEs [10] --> Loop 5
* CEs [9] --> Loop 6
* CEs [8] --> Loop 7
### Ranking functions of CR ackin(V,V1,Out)
#### Partial ranking functions of CR ackin(V,V1,Out)
* Partial RF of phase [5,6]:
- RF of loop [5:1,6:1]:
V1 depends on loops [6:2]
- RF of loop [6:2]:
V
### Specialization of cost equations start/2
* CE 2 is refined into CE [11]
* CE 3 is refined into CE [12]
* CE 4 is refined into CE [13]
### Cost equations --> "Loop" of start/2
* CEs [11,12,13] --> Loop 8
### Ranking functions of CR start(V,V1)
#### Partial ranking functions of CR start(V,V1)
Computing Bounds
=====================================
#### Cost of chains of ackin(V,V1,Out):
* Chain [7]: 0
with precondition: [Out=0,V>=0,V1>=0]
* Chain [multiple([5,6],[[7]])]: 1*it(5)+0
Such that:it(5) =< V1
with precondition: [Out=0,V>=1,V1>=1]
#### Cost of chains of start(V,V1):
* Chain [8]: 1*s(2)+1*s(3)+1
Such that:s(2) =< V
s(3) =< V1
with precondition: [V>=0,V1>=0]
Closed-form bounds of start(V,V1):
-------------------------------------
* Chain [8] with precondition: [V>=0,V1>=0]
- Upper bound: V+V1+1
- Complexity: n
### Maximum cost of start(V,V1): V+V1+1
Asymptotic class: n
* Total analysis performed in 87 ms.